import "@/assets/styles/index.scss"; // global css

import { createApp } from "vue";
import App from "./App.vue";
const app = createApp(App);

// Vue-Router
import router from "./router";
app.use(router);

import "./permission";

// ElementPlus
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import * as ElementPlusIconsVue from "@element-plus/icons-vue"; // ElementPlus图标库
import zhLocale from "element-plus/es/locale/lang/zh-cn"; // ElementPlus中文语言包

app.use(ElementPlus, { locale: zhLocale });
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

// Vuetify
import "vuetify/styles";
import { createVuetify } from "vuetify";
import * as components from "vuetify/components";
import * as directives from "vuetify/directives";
import { aliases, mdi } from "vuetify/iconsets/mdi"; // Vuetify图标库
import "@mdi/font/css/materialdesignicons.css"; // mdi图标库

const vuetify = createVuetify({
  components,
  directives,
  icons: {
    defaultSet: "mdi",
    aliases,
    sets: {
      mdi,
    },
  },
});

app.use(vuetify);

app.mount("#app");
